package com.hsgene.logistics.persistence;

import com.hsgene.logistics.domain.LogisticsInfo;
import com.hsgene.logistics.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物流持久层
 *
 * @Author: wangxuefeng@hsgene.com
 * @Description:
 * @Date: Created in 9:43 2018/7/20
 * @Modified By:
 */
public interface LogisticsPersistence extends BaseMapper<LogisticsInfo> {
    /**
     * 查询物流
     *
     * @param logisticsNumber 物流编号
     * @return
     */
    List<LogisticsInfo> queryByLogisticsNumber(@Param("logisticsNumber") String logisticsNumber);

    /**
     * 查询指定状态下的物流
     *
     * @param orderId 订单号
     * @param status  物流状态
     * @return
     */
    LogisticsInfo queryByLogisticsNumberAndStatus(@Param("orderId") String orderId, @Param("status") int status);

    /**
     * 插入物流物流
     *
     * @param logisticsInfos
     */
    void insertLogisticsInfos(@Param("logisticsInfos") List<LogisticsInfo> logisticsInfos);
}
